
clear all 

//define folder global here

gl Inputs "$folder\1_Inputs"
gl Intermediate "$folder\2_Intermediate"
gl Outputs "$folder\3_Outputs"

********************************************************************************

use "${Intermediate}\Combined for forloops.dta", clear

gen keeping = 1 if inlist(outcome, "fute", "move", "povr", "eshu", "home", "earn", "empl")
replace keeping = 1 if inlist(outcome, "inde", "cred", "zero", "deli", "auto", "hosp", "emer", "ment")
replace keeping = . if !inlist(spec, "ols", "ldv", "ivac")
replace keeping = . if inlist(group, "gr0", "gr1")
replace keeping = . if !inlist(time, "q0104", "q0508", "q0916", "q1724")

keep if keeping==1 
drop keeping

levelsof outcome, local(outcomes)
levelsof group, local(groups)
levelsof spec, local(specs)
levelsof time, local(times)
levelsof geo, local(geos)
levelsof item, local(items)

foreach outx in `outcomes' {
	local id1 = "`outx'"
	
	foreach grox in `groups' {
		local id2 = "`grox'"
		
		foreach spex in `specs' {
			local id3 = "`spex'"
			
			foreach timx in `times' {
				local id4 = "`timx'"
				
				foreach geox in `geos' {
					local id5 = "`geox'"
					
					foreach itex in `items' {
						local id6 = "`itex'"
		
					levelsof value if 	outcome=="`outx'" & ///
										group=="`grox'" & ///
										spec=="`spex'" & ///
										time=="`timx'" & ///
										geo=="`geox'" & ///
										item=="`itex'" , ///
						clean local(`id1'_`id2'_`id3'_`id4'_`id5'_`id6')
						di "`id1'_`id2'_`id3'_`id4'_`id5'_`id6'"
						
					}
				}
			}
		}
	}
}


********************************************************************************
********************************************************************************
**# TABLE H5

texdoc init "${Outputs}/Supplementary data_Table_H5.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{3-4 Years After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{5-6 Years After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV ///
	& & $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}			
 
tex 						& & & & & & & \\
		
tex $x \textbf{Not at eviction address:} 	& `move_a_ldv_q0916_b_m' 			& `move_a_ldv_q0916_b_co' 			& `move_a_ivac_q0916_b_co' ///
							& & `move_a_ldv_q1724_b_m' 		& `move_a_ldv_q1724_b_co' 			& `move_a_ivac_q1724_b_co' \\ 
tex 						& `move_a_ldv_q0916_b_mse' 		& `move_a_ldv_q0916_b_se' 			& `move_a_ivac_q0916_b_se' ///
							& & `move_a_ldv_q1724_b_mse' 		& `move_a_ldv_q1724_b_se' 			& `move_a_ivac_q1724_b_se' \\ 
tex							& \multicolumn{3}{r}{[`move_a_ivac_q0916_b_obs']} 					& & \multicolumn{3}{r}{[`move_a_ivac_q1724_b_obs']} \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `move_a_ldv_q0916_c_m' 			& `move_a_ldv_q0916_c_co' 			& `move_a_ivac_q0916_c_co' ///
							& & `move_a_ldv_q1724_c_m' 		& `move_a_ldv_q1724_c_co' 			& `move_a_ivac_q1724_c_co' \\ 
tex 						& `move_a_ldv_q0916_c_mse' 		& `move_a_ldv_q0916_c_se' 			& `move_a_ivac_q0916_c_se' ///
							& & `move_a_ldv_q1724_c_mse' 		& `move_a_ldv_q1724_c_se' 			& `move_a_ivac_q1724_c_se' \\ 				
tex $x ~~~New York 			& `move_a_ldv_q0916_n_m' 			& `move_a_ldv_q0916_n_co' 			& `move_a_ivac_q0916_n_co' ///
							& & `move_a_ldv_q1724_n_m' 		& `move_a_ldv_q1724_n_co' 			& `move_a_ivac_q1724_n_co' \\ 
tex 						& `move_a_ldv_q0916_n_mse' 		& `move_a_ldv_q0916_n_se' 			& `move_a_ivac_q0916_n_se' ///
							& & `move_a_ldv_q1724_n_mse' 		& `move_a_ldv_q1724_n_se' 			& `move_a_ivac_q1724_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\				
tex $x ~~~Female 			& `move_f_ldv_q0916_b_m' 			& `move_f_ldv_q0916_b_co' 			& `move_f_ivac_q0916_b_co' ///
							& & `move_f_ldv_q1724_b_m' 		& `move_f_ldv_q1724_b_co' 			& `move_f_ivac_q1724_b_co' \\ 
tex 						& `move_f_ldv_q0916_b_mse' 		& `move_f_ldv_q0916_b_se' 			& `move_f_ivac_q0916_b_se' ///
							& & `move_f_ldv_q1724_b_mse' 		& `move_f_ldv_q1724_b_se' 			& `move_f_ivac_q1724_b_se' \\ 			
tex $x ~~~Black 			& `move_b_ldv_q0916_b_m' 			& `move_b_ldv_q0916_b_co' 			& `move_b_ivac_q0916_b_co' ///
							& & `move_b_ldv_q1724_b_m' 		& `move_b_ldv_q1724_b_co' 			& `move_b_ivac_q1724_b_co' \\ 
tex 						& `move_b_ldv_q0916_b_mse' 		& `move_b_ldv_q0916_b_se' 			& `move_b_ivac_q0916_b_se' ///
							& & `move_b_ldv_q1724_b_mse' 		& `move_b_ldv_q1724_b_se' 			& `move_b_ivac_q1724_b_se' \\
							
tex \midrule 
tex 						& & & & & & & \\
							
tex $x \textbf{Neighborhood poverty rate:} 	& `povr_a_ldv_q0916_b_m' 			& `povr_a_ldv_q0916_b_co' 			& `povr_a_ivac_q0916_b_co' ///
							& & `povr_a_ldv_q1724_b_m' 		& `povr_a_ldv_q1724_b_co' 			& `povr_a_ivac_q1724_b_co' \\ 
tex 						& `povr_a_ldv_q0916_b_mse' 		& `povr_a_ldv_q0916_b_se' 			& `povr_a_ivac_q0916_b_se' ///
							& & `povr_a_ldv_q1724_b_mse' 		& `povr_a_ldv_q1724_b_se' 			& `povr_a_ivac_q1724_b_se' \\ 
tex							& \multicolumn{3}{r}{[`povr_a_ivac_q0916_b_obs']} 					& & \multicolumn{3}{r}{[`povr_a_ivac_q1724_b_obs']} \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `povr_a_ldv_q0916_c_m' 			& `povr_a_ldv_q0916_c_co' 			& `povr_a_ivac_q0916_c_co' ///
							& & `povr_a_ldv_q1724_c_m' 		& `povr_a_ldv_q1724_c_co' 			& `povr_a_ivac_q1724_c_co' \\ 
tex 						& `povr_a_ldv_q0916_c_mse' 		& `povr_a_ldv_q0916_c_se' 			& `povr_a_ivac_q0916_c_se' ///
							& & `povr_a_ldv_q1724_c_mse' 		& `povr_a_ldv_q1724_c_se' 			& `povr_a_ivac_q1724_c_se' \\ 				
tex $x ~~~New York 			& `povr_a_ldv_q0916_n_m' 			& `povr_a_ldv_q0916_n_co' 			& `povr_a_ivac_q0916_n_co' ///
							& & `povr_a_ldv_q1724_n_m' 		& `povr_a_ldv_q1724_n_co' 			& `povr_a_ivac_q1724_n_co' \\ 
tex 						& `povr_a_ldv_q0916_n_mse' 		& `povr_a_ldv_q0916_n_se' 			& `povr_a_ivac_q0916_n_se' ///
							& & `povr_a_ldv_q1724_n_mse' 		& `povr_a_ldv_q1724_n_se' 			& `povr_a_ivac_q1724_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\				
tex $x ~~~Female 			& `povr_f_ldv_q0916_b_m' 			& `povr_f_ldv_q0916_b_co' 			& `povr_f_ivac_q0916_b_co' ///
							& & `povr_f_ldv_q1724_b_m' 		& `povr_f_ldv_q1724_b_co' 			& `povr_f_ivac_q1724_b_co' \\ 
tex 						& `povr_f_ldv_q0916_b_mse' 		& `povr_f_ldv_q0916_b_se' 			& `povr_f_ivac_q0916_b_se' ///
							& & `povr_f_ldv_q1724_b_mse' 		& `povr_f_ldv_q1724_b_se' 			& `povr_f_ivac_q1724_b_se' \\ 			
tex $x ~~~Black 			& `povr_b_ldv_q0916_b_m' 			& `povr_b_ldv_q0916_b_co' 			& `povr_b_ivac_q0916_b_co' ///
							& & `povr_b_ldv_q1724_b_m' 		& `povr_b_ldv_q1724_b_co' 			& `povr_b_ivac_q1724_b_co' \\ 
tex 						& `povr_b_ldv_q0916_b_mse' 		& `povr_b_ldv_q0916_b_se' 			& `povr_b_ivac_q0916_b_se' ///
							& & `povr_b_ldv_q1724_b_mse' 		& `povr_b_ldv_q1724_b_se' 			& `povr_b_ivac_q1724_b_se' \\
	

tex \midrule	
tex 						& & & & & & & \\

tex $x \textbf{Emergency shelter:} 	& `eshu_a_ldv_q0916_b_m' 		& `eshu_a_ldv_q0916_b_co' 			& `eshu_a_ivac_q0916_b_co' ///
							& & `eshu_a_ldv_q1724_b_m'	 	& `eshu_a_ldv_q1724_b_co' 			& `eshu_a_ivac_q1724_b_co' \\ 
tex 						& `eshu_a_ldv_q0916_b_mse' 		& `eshu_a_ldv_q0916_b_se' 			& `eshu_a_ivac_q0916_b_se' ///
							& & `eshu_a_ldv_q1724_b_mse' 	& `eshu_a_ldv_q1724_b_se' 			& `eshu_a_ivac_q1724_b_se' \\ 
tex							& \multicolumn{3}{r}{[`eshu_a_ivac_q0916_b_obs']} 					& & \multicolumn{3}{r}{[`eshu_a_ivac_q1724_b_obs']} \\

tex $x \textit{By Location} 	& & & & & & & \\					
tex $x ~~~Cook County 		& `eshu_a_ldv_q0916_c_m' 		& `eshu_a_ldv_q0916_c_co' 			& `eshu_a_ivac_q0916_c_co' ///
							& & `eshu_a_ldv_q1724_c_m' 		& `eshu_a_ldv_q1724_c_co' 			& `eshu_a_ivac_q1724_c_co' \\ 
tex 						& `eshu_a_ldv_q0916_c_mse' 		& `eshu_a_ldv_q0916_c_se' 			& `eshu_a_ivac_q0916_c_se' ///
							& & `eshu_a_ldv_q1724_c_mse' 	& `eshu_a_ldv_q1724_c_se' 			& `eshu_a_ivac_q1724_c_se' \\ 				
tex $x ~~~New York 			& `eshu_a_ldv_q0916_n_m' 		& `eshu_a_ldv_q0916_n_co' 			& `eshu_a_ivac_q0916_n_co' ///
							& & `eshu_a_ldv_q1724_n_m' 		& `eshu_a_ldv_q1724_n_co' 			& `eshu_a_ivac_q1724_n_co' \\ 
tex 						& `eshu_a_ldv_q0916_n_mse' 		& `eshu_a_ldv_q0916_n_se' 			& `eshu_a_ivac_q0916_n_se' ///
							& & `eshu_a_ldv_q1724_n_mse' 	& `eshu_a_ldv_q1724_n_se' 			& `eshu_a_ivac_q1724_n_se' \\ 
tex $x \textit{By Group}	& & & & & & & \\					
tex $x ~~~Female 			& `eshu_f_ldv_q0916_b_m' 		& `eshu_f_ldv_q0916_b_co' 			& `eshu_f_ivac_q0916_b_co' ///
							& & `eshu_f_ldv_q1724_b_m' 		& `eshu_f_ldv_q1724_b_co' 			& `eshu_f_ivac_q1724_b_co' \\ 
tex 						& `eshu_f_ldv_q0916_b_mse' 		& `eshu_f_ldv_q0916_b_se' 			& `eshu_f_ivac_q0916_b_se' ///
							& & `eshu_f_ldv_q1724_b_mse' 	& `eshu_f_ldv_q1724_b_se' 			& `eshu_f_ivac_q1724_b_se' \\ 			
				
tex $x ~~~Black  			& `eshu_b_ldv_q0916_b_m' 		& `eshu_b_ldv_q0916_b_co' 			& `eshu_b_ivac_q0916_b_co' ///
							& & `eshu_b_ldv_q1724_b_m' 		& `eshu_b_ldv_q1724_b_co' 			& `eshu_b_ivac_q1724_b_co' \\ 
tex 						& `eshu_b_ldv_q0916_b_mse' 		& `eshu_b_ldv_q0916_b_se' 			& `eshu_b_ivac_q0916_b_se' ///
							& & `eshu_b_ldv_q1724_b_mse' 	& `eshu_b_ldv_q1724_b_se' 			& `eshu_b_ivac_q1724_b_se' \\
tex \midrule	
tex 						& & & & & & & \\			

tex $x \textbf{Any homelessness services:} 	& `home_a_ldv_q0916_b_m' 		& `home_a_ldv_q0916_b_co' 			& `home_a_ivac_q0916_b_co' ///
							& & `home_a_ldv_q1724_b_m'	 	& `home_a_ldv_q1724_b_co' 			& `home_a_ivac_q1724_b_co' \\ 
tex 						& `home_a_ldv_q0916_b_mse' 		& `home_a_ldv_q0916_b_se' 			& `home_a_ivac_q0916_b_se' ///
							& & `home_a_ldv_q1724_b_mse' 	& `home_a_ldv_q1724_b_se' 			& `home_a_ivac_q1724_b_se' \\ 
tex 						& \multicolumn{3}{r}{[`home_a_ivac_q0916_b_obs']} 					& & \multicolumn{3}{r}{[`home_a_ivac_q1724_b_obs']} \\
tex $x \textit{By Location} 	& & & & & & & \\					
tex $x ~~~Cook County 		& `home_a_ldv_q0916_c_m' 		& `home_a_ldv_q0916_c_co' 			& `home_a_ivac_q0916_c_co' ///
							& & `home_a_ldv_q1724_c_m' 		& `home_a_ldv_q1724_c_co' 			& `home_a_ivac_q1724_c_co' \\ 
tex 						& `home_a_ldv_q0916_c_mse' 		& `home_a_ldv_q0916_c_se' 			& `home_a_ivac_q0916_c_se' ///
							& & `home_a_ldv_q1724_c_mse' 	& `home_a_ldv_q1724_c_se' 			& `home_a_ivac_q1724_c_se' \\ 				
tex $x ~~~New York 			& `home_a_ldv_q0916_n_m' 		& `home_a_ldv_q0916_n_co' 			& `home_a_ivac_q0916_n_co' ///
							& & `home_a_ldv_q1724_n_m' 		& `home_a_ldv_q1724_n_co' 			& `home_a_ivac_q1724_n_co' \\ 
tex 						& `home_a_ldv_q0916_n_mse' 		& `home_a_ldv_q0916_n_se' 			& `home_a_ivac_q0916_n_se' ///
							& & `home_a_ldv_q1724_n_mse' 	& `home_a_ldv_q1724_n_se' 			& `home_a_ivac_q1724_n_se' \\ 
tex $x \textit{By Group}	& & & & & & & \\					
tex $x ~~~Female 			& `home_f_ldv_q0916_b_m' 		& `home_f_ldv_q0916_b_co' 			& `home_f_ivac_q0916_b_co' ///
							& & `home_f_ldv_q1724_b_m' 		& `home_f_ldv_q1724_b_co' 			& `home_f_ivac_q1724_b_co' \\ 
tex 						& `home_f_ldv_q0916_b_mse' 		& `home_f_ldv_q0916_b_se' 			& `home_f_ivac_q0916_b_se' ///
							& & `home_f_ldv_q1724_b_mse' 	& `home_f_ldv_q1724_b_se' 			& `home_f_ivac_q1724_b_se' \\ 			
				
tex $x ~~~Black  			& `home_b_ldv_q0916_b_m' 		& `home_b_ldv_q0916_b_co' 			& `home_b_ivac_q0916_b_co' ///
							& & `home_b_ldv_q1724_b_m' 		& `home_b_ldv_q1724_b_co' 			& `home_b_ivac_q1724_b_co' \\ 
tex 						& `home_b_ldv_q0916_b_mse' 		& `home_b_ldv_q0916_b_se' 			& `home_b_ivac_q0916_b_se' ///
							& & `home_b_ldv_q1724_b_mse' 	& `home_b_ldv_q1724_b_se' 			& `home_b_ivac_q1724_b_se' \\				
		

tex \bottomrule \\
tex	\end{tabular} }
texdoc close




********************************************************************************
********************************************************************************
**# TABLE H6

texdoc init "${Outputs}/Supplementary data_Table_H6.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{9-16 Quarters After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{17-24 Quarters After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV ///
	& & $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}

tex & & & & & & & \\
tex $x \textbf{Earnings:} 	& `earn_a_ldv_q0916_b_m' 		& `earn_a_ldv_q0916_b_co' 		& `earn_a_ivac_q0916_b_co' ///
							& & `earn_a_ldv_q1724_b_m' 		& `earn_a_ldv_q1724_b_co' 		& `earn_a_ivac_q1724_b_co' \\ 
tex 						& `earn_a_ldv_q0916_b_mse' 		& `earn_a_ldv_q0916_b_se' 		& `earn_a_ivac_q0916_b_se' ///
							& & `earn_a_ldv_q1724_b_mse' 	& `earn_a_ldv_q1724_b_se' 		& `earn_a_ivac_q1724_b_se' \\			
tex $x 				 		& \multicolumn{3}{r}{[`earn_a_ldv_q0916_b_obs']} 				& & \multicolumn{3}{r}{[`earn_a_ldv_q1724_b_obs']} \\							
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `earn_a_ldv_q0916_c_m' 		& `earn_a_ldv_q0916_c_co' 		& `earn_a_ivac_q0916_c_co' ///
							& & `earn_a_ldv_q1724_c_m' 		& `earn_a_ldv_q1724_c_co' 		& `earn_a_ivac_q1724_c_co' \\ 
tex 						& `earn_a_ldv_q0916_c_mse' 		& `earn_a_ldv_q0916_c_se' 		& `earn_a_ivac_q0916_c_se' ///
							& & `earn_a_ldv_q1724_c_mse' 	& `earn_a_ldv_q1724_c_se' 		& `earn_a_ivac_q1724_c_se' \\ 				
tex $x ~~~New York 			& `earn_a_ldv_q0916_n_m' 		& `earn_a_ldv_q0916_n_co' 		& `earn_a_ivac_q0916_n_co' ///
							& & `earn_a_ldv_q1724_n_m' 		& `earn_a_ldv_q1724_n_co' 		& `earn_a_ivac_q1724_n_co' \\ 
tex 						& `earn_a_ldv_q0916_n_mse' 		& `earn_a_ldv_q0916_n_se' 		& `earn_a_ivac_q0916_n_se' ///
							& & `earn_a_ldv_q1724_n_mse' 	& `earn_a_ldv_q1724_n_se' 		& `earn_a_ivac_q1724_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\								
tex $x ~~~Female 			& `earn_f_ldv_q0916_b_m' 		& `earn_f_ldv_q0916_b_co' 		& `earn_f_ivac_q0916_b_co' ///
							& & `earn_f_ldv_q1724_b_m' 		& `earn_f_ldv_q1724_b_co' 		& `earn_f_ivac_q1724_b_co' \\ 
tex 						& `earn_f_ldv_q0916_b_mse' 		& `earn_f_ldv_q0916_b_se' 		& `earn_f_ivac_q0916_b_se' ///
							& & `earn_f_ldv_q1724_b_mse' 	& `earn_f_ldv_q1724_b_se' 		& `earn_f_ivac_q1724_b_se' \\ 			
tex $x ~~~Black  			& `earn_b_ldv_q0916_b_m' 		& `earn_b_ldv_q0916_b_co' 		& `earn_b_ivac_q0916_b_co' ///
							& & `earn_b_ldv_q1724_b_m' 		& `earn_b_ldv_q1724_b_co' 		& `earn_b_ivac_q1724_b_co' \\ 
tex 						& `earn_b_ldv_q0916_b_mse' 		& `earn_b_ldv_q0916_b_se' 		& `earn_b_ivac_q0916_b_se' ///
							& & `earn_b_ldv_q1724_b_mse' 	& `earn_b_ldv_q1724_b_se' 		& `earn_b_ivac_q1724_b_se' \\ 	
tex \midrule				

tex 					 	& & & & & & & \\
tex $x \textbf{Employment:} 	& `empl_a_ldv_q0916_b_m' 		& `empl_a_ldv_q0916_b_co'		& `empl_a_ivac_q0916_b_co' ///
							& & `empl_a_ldv_q1724_b_m' 		& `empl_a_ldv_q1724_b_co' 		& `empl_a_ivac_q1724_b_co' \\ 
tex 						& `empl_a_ldv_q0916_b_mse' 		& `empl_a_ldv_q0916_b_se' 		& `empl_a_ivac_q0916_b_se' ///
							& & `empl_a_ldv_q1724_b_mse' 	& `empl_a_ldv_q1724_b_se' 		& `empl_a_ivac_q1724_b_se' \\ 
tex $x 						& \multicolumn{3}{r}{[`empl_a_ldv_q0916_b_obs']} 				& & \multicolumn{3}{r}{[`empl_a_ldv_q1724_b_obs']} \\
tex $x \textit{By Location} 	& & & & & & & \\								
tex $x ~~~Cook County 		& `empl_a_ldv_q0916_c_m' 		& `empl_a_ldv_q0916_c_co' 		& `empl_a_ivac_q0916_c_co' ///
							& & `empl_a_ldv_q1724_c_m' 		& `empl_a_ldv_q1724_c_co' 		& `empl_a_ivac_q1724_c_co' \\ 
tex 						& `empl_a_ldv_q0916_c_mse' 		& `empl_a_ldv_q0916_c_se' 		& `empl_a_ivac_q0916_c_se' ///
							& & `empl_a_ldv_q1724_c_mse' 	& `empl_a_ldv_q1724_c_se' 		& `empl_a_ivac_q1724_c_se' \\ 				
tex $x ~~~New York 			& `empl_a_ldv_q0916_n_m' 		& `empl_a_ldv_q0916_n_co' 		& `empl_a_ivac_q0916_n_co' ///
							& & `empl_a_ldv_q1724_n_m' 		& `empl_a_ldv_q1724_n_co' 		& `empl_a_ivac_q1724_n_co' \\ 
tex 						& `empl_a_ldv_q0916_n_mse' 		& `empl_a_ldv_q0916_n_se' 		& `empl_a_ivac_q0916_n_se' ///
							& & `empl_a_ldv_q1724_n_mse' 	& `empl_a_ldv_q1724_n_se' 		& `empl_a_ivac_q1724_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\				
tex $x ~~~Female 			& `empl_f_ldv_q0916_b_m' 		& `empl_f_ldv_q0916_b_co' 		& `empl_f_ivac_q0916_b_co' ///
							& & `empl_f_ldv_q1724_b_m' 		& `empl_f_ldv_q1724_b_co' 		& `empl_f_ivac_q1724_b_co' \\ 
tex 						& `empl_f_ldv_q0916_b_mse' 		& `empl_f_ldv_q0916_b_se' 		& `empl_f_ivac_q0916_b_se' ///
							& & `empl_f_ldv_q1724_b_mse' 	& `empl_f_ldv_q1724_b_se' 		& `empl_f_ivac_q1724_b_se' \\ 			
tex $x ~~~Black  			& `empl_b_ldv_q0916_b_m' 		& `empl_b_ldv_q0916_b_co' 		& `empl_b_ivac_q0916_b_co' ///
							& & `empl_b_ldv_q1724_b_m' 		& `empl_b_ldv_q1724_b_co' 		& `empl_b_ivac_q1724_b_co' \\ 
tex 						& `empl_b_ldv_q0916_b_mse' 		& `empl_b_ldv_q0916_b_se' 		& `empl_b_ivac_q0916_b_se' ///
							& & `empl_b_ldv_q1724_b_mse' 	& `empl_b_ldv_q1724_b_se' 		& `empl_b_ivac_q1724_b_se' \\


tex \bottomrule \\
tex	\end{tabular} }
texdoc close


********************************************************************************
********************************************************************************
**# TABLE H7

texdoc init "${Outputs}/Supplementary data_Table_H7.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{9-16 Quarters After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{17-24 Quarters After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV ///
	& & $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}
tex 						& & & & & & & \\
tex $x \textbf{Financial health index:}	& `inde_a_ldv_q0916_b_m' 		& `inde_a_ldv_q0916_b_co' 		& `inde_a_ivac_q0916_b_co' ///
							& & `inde_a_ldv_q1724_b_m' 		& `inde_a_ldv_q1724_b_co' 		& `inde_a_ivac_q1724_b_co' \\ 
tex 						& `inde_a_ldv_q0916_b_mse' 		& `inde_a_ldv_q0916_b_se' 		& `inde_a_ivac_q0916_b_se' ///
							& & `inde_a_ldv_q1724_b_mse' 	& `inde_a_ldv_q1724_b_se' 		& `inde_a_ivac_q1724_b_se' \\ 	
tex 			 			& \multicolumn{3}{r}{[`inde_a_ldv_q0916_b_obs']} 				& & \multicolumn{3}{r}{[`inde_a_ldv_q1724_b_obs']} \\	
							
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `inde_a_ldv_q0916_c_m' 		& `inde_a_ldv_q0916_c_co' 		& `inde_a_ivac_q0916_c_co' ///
							& & `inde_a_ldv_q1724_c_m' 		& `inde_a_ldv_q1724_c_co'		& `inde_a_ivac_q1724_c_co' \\ 
tex 						& `inde_a_ldv_q0916_c_mse' 		& `inde_a_ldv_q0916_c_se' 		& `inde_a_ivac_q0916_c_se' ///
							& & `inde_a_ldv_q1724_c_mse' 	& `inde_a_ldv_q1724_c_se' 		& `inde_a_ivac_q1724_c_se' \\ 
tex $x ~~~New York 			& `inde_a_ldv_q0916_n_m'	 	& `inde_a_ldv_q0916_n_co' 		& `inde_a_ivac_q0916_n_co' ///
							& & `inde_a_ldv_q1724_n_m' 		& `inde_a_ldv_q1724_n_co' 		& `inde_a_ivac_q1724_n_co' \\ 
tex 						& `inde_a_ldv_q0916_n_mse' 		& `inde_a_ldv_q0916_n_se' 		& `inde_a_ivac_q0916_n_se' ///
							& & `inde_a_ldv_q1724_n_mse'	& `inde_a_ldv_q1724_n_se' 		& `inde_a_ivac_q1724_n_se' \\ 		
tex \midrule				
tex 						& & & & & & & \\
tex $x \textbf{Credit score:} 	& `cred_a_ldv_q0916_b_m' 		& `cred_a_ldv_q0916_b_co' 		& `cred_a_ivac_q0916_b_co' ///
							& & `cred_a_ldv_q1724_b_m' 		& `cred_a_ldv_q1724_b_co' 		& `cred_a_ivac_q1724_b_co' \\ 
tex 						& `cred_a_ldv_q0916_b_mse' 		& `cred_a_ldv_q0916_b_se' 		& `cred_a_ivac_q0916_b_se' ///
							& & `cred_a_ldv_q1724_b_mse' 	& `cred_a_ldv_q1724_b_se' 		& `cred_a_ivac_q1724_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `cred_a_ldv_q0916_c_m' 		& `cred_a_ldv_q0916_c_co' 		& `cred_a_ivac_q0916_c_co' ///
							& & `cred_a_ldv_q1724_c_m' 		& `cred_a_ldv_q1724_c_co'		& `cred_a_ivac_q1724_c_co' \\ 
tex 						& `cred_a_ldv_q0916_c_mse' 		& `cred_a_ldv_q0916_c_se' 		& `cred_a_ivac_q0916_c_se' ///
							& & `cred_a_ldv_q1724_c_mse' 	& `cred_a_ldv_q1724_c_se' 		& `cred_a_ivac_q1724_c_se' \\ 
tex $x ~~~New York 			& `cred_a_ldv_q0916_n_m'	 	& `cred_a_ldv_q0916_n_co' 		& `cred_a_ivac_q0916_n_co' ///
							& & `cred_a_ldv_q1724_n_m' 		& `cred_a_ldv_q1724_n_co' 		& `cred_a_ivac_q1724_n_co' \\ 
tex 						& `cred_a_ldv_q0916_n_mse' 		& `cred_a_ldv_q0916_n_se' 		& `cred_a_ivac_q0916_n_se' ///
							& & `cred_a_ldv_q1724_n_mse'	& `cred_a_ldv_q1724_n_se' 		& `cred_a_ivac_q1724_n_se' \\ 	

tex \midrule 
tex 						& & & & & & & \\
tex $x \textbf{No open revolving account:} 	& `zero_a_ldv_q0916_b_m' 		& `zero_a_ldv_q0916_b_co' 		& `zero_a_ivac_q0916_b_co' ///
							& & `zero_a_ldv_q1724_b_m' 		& `zero_a_ldv_q1724_b_co' 		& `zero_a_ivac_q1724_b_co' \\ 
tex 						& `zero_a_ldv_q0916_b_mse' 		& `zero_a_ldv_q0916_b_se' 		& `zero_a_ivac_q0916_b_se' ///
							& & `zero_a_ldv_q1724_b_mse' 	& `zero_a_ldv_q1724_b_se' 		& `zero_a_ivac_q1724_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `zero_a_ldv_q0916_c_m' 		& `zero_a_ldv_q0916_c_co' 		& `zero_a_ivac_q0916_c_co' ///
							& & `zero_a_ldv_q1724_c_m' 		& `zero_a_ldv_q1724_c_co'		& `zero_a_ivac_q1724_c_co' \\ 
tex 						& `zero_a_ldv_q0916_c_mse' 		& `zero_a_ldv_q0916_c_se' 		& `zero_a_ivac_q0916_c_se' ///
							& & `zero_a_ldv_q1724_c_mse' 	& `zero_a_ldv_q1724_c_se' 		& `zero_a_ivac_q1724_c_se' \\ 
tex $x ~~~New York 			& `zero_a_ldv_q0916_n_m'	 	& `zero_a_ldv_q0916_n_co' 		& `zero_a_ivac_q0916_n_co' ///
							& & `zero_a_ldv_q1724_n_m' 		& `zero_a_ldv_q1724_n_co' 		& `zero_a_ivac_q1724_n_co' \\ 
tex 						& `zero_a_ldv_q0916_n_mse' 		& `zero_a_ldv_q0916_n_se' 		& `zero_a_ivac_q0916_n_se' ///
							& & `zero_a_ldv_q1724_n_mse'	& `zero_a_ldv_q1724_n_se' 		& `zero_a_ivac_q1724_n_se' \\ 		

tex \midrule 
tex 						& & & & & & & \\
tex $x \textbf{Total balance: collections and delinquencies:}	& `deli_a_ldv_q0916_b_m' 		& `deli_a_ldv_q0916_b_co' 		& `deli_a_ivac_q0916_b_co' ///
							& & `deli_a_ldv_q1724_b_m' 		& `deli_a_ldv_q1724_b_co' 		& `deli_a_ivac_q1724_b_co' \\ 
tex 						& `deli_a_ldv_q0916_b_mse' 		& `deli_a_ldv_q0916_b_se' 		& `deli_a_ivac_q0916_b_se' ///
							& & `deli_a_ldv_q1724_b_mse' 	& `deli_a_ldv_q1724_b_se' 		& `deli_a_ivac_q1724_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `deli_a_ldv_q0916_c_m' 		& `deli_a_ldv_q0916_c_co' 		& `deli_a_ivac_q0916_c_co' ///
							& & `deli_a_ldv_q1724_c_m' 		& `deli_a_ldv_q1724_c_co'		& `deli_a_ivac_q1724_c_co' \\ 
tex 						& `deli_a_ldv_q0916_c_mse' 		& `deli_a_ldv_q0916_c_se' 		& `deli_a_ivac_q0916_c_se' ///
							& & `deli_a_ldv_q1724_c_mse' 	& `deli_a_ldv_q1724_c_se' 		& `deli_a_ivac_q1724_c_se' \\ 
tex $x ~~~New York 			& `deli_a_ldv_q0916_n_m'	 	& `deli_a_ldv_q0916_n_co' 		& `deli_a_ivac_q0916_n_co' ///
							& & `deli_a_ldv_q1724_n_m' 		& `deli_a_ldv_q1724_n_co' 		& `deli_a_ivac_q1724_n_co' \\ 
tex 						& `deli_a_ldv_q0916_n_mse' 		& `deli_a_ldv_q0916_n_se' 		& `deli_a_ivac_q0916_n_se' ///
							& & `deli_a_ldv_q1724_n_mse'	& `deli_a_ldv_q1724_n_se' 		& `deli_a_ivac_q1724_n_se' \\ 	

tex \midrule 
tex 						& & & & & & & \\
tex $x \textbf{Any auto loan or lease:} 	& `auto_a_ldv_q0916_b_m' 		& `auto_a_ldv_q0916_b_co' 		& `auto_a_ivac_q0916_b_co' ///
							& & `auto_a_ldv_q1724_b_m' 		& `auto_a_ldv_q1724_b_co' 		& `auto_a_ivac_q1724_b_co' \\ 
tex 						& `auto_a_ldv_q0916_b_mse' 		& `auto_a_ldv_q0916_b_se' 		& `auto_a_ivac_q0916_b_se' ///
							& & `auto_a_ldv_q1724_b_mse' 	& `auto_a_ldv_q1724_b_se' 		& `auto_a_ivac_q1724_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `auto_a_ldv_q0916_c_m' 		& `auto_a_ldv_q0916_c_co' 		& `auto_a_ivac_q0916_c_co' ///
							& & `auto_a_ldv_q1724_c_m' 		& `auto_a_ldv_q1724_c_co'		& `auto_a_ivac_q1724_c_co' \\ 
tex 						& `auto_a_ldv_q0916_c_mse' 		& `auto_a_ldv_q0916_c_se' 		& `auto_a_ivac_q0916_c_se' ///
							& & `auto_a_ldv_q1724_c_mse' 	& `auto_a_ldv_q1724_c_se' 		& `auto_a_ivac_q1724_c_se' \\ 
tex $x ~~~New York 			& `auto_a_ldv_q0916_n_m'	 	& `auto_a_ldv_q0916_n_co' 		& `auto_a_ivac_q0916_n_co' ///
							& & `auto_a_ldv_q1724_n_m' 		& `auto_a_ldv_q1724_n_co' 		& `auto_a_ivac_q1724_n_co' \\ 
tex 						& `auto_a_ldv_q0916_n_mse' 		& `auto_a_ldv_q0916_n_se' 		& `auto_a_ivac_q0916_n_se' ///
							& & `auto_a_ldv_q1724_n_mse'	& `auto_a_ldv_q1724_n_se' 		& `auto_a_ivac_q1724_n_se' \\ 	

tex \bottomrule \\
tex	\end{tabular} }
texdoc close



********************************************************************************
********************************************************************************
**# TABLE H8

texdoc init "${Outputs}/Supplementary data_Table_H8.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{9-16 Quarters After Filing}}  \\
	
tex \cmidrule{2-4} 
	
tex	& $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV  \\

tex & (1) & (2) & (3) \\
tex \cline{2-4} 

tex 						& & &  \\
tex $x Number of hospital visits 	& `hosp_a_ols_q0916_n_m' 		& `hosp_a_ols_q0916_n_co' 			& `hosp_a_ivac_q0916_n_co' \\
tex							& `hosp_a_ols_q0916_n_mse' 		& `hosp_a_ols_q0916_n_se' 			& `hosp_a_ivac_q0916_n_se' \\
tex \multicolumn{4}{l}{ } \\				

tex $x Number of emergency visits 	& `emer_a_ols_q0916_n_m' 		& `emer_a_ols_q0916_n_co' 			& `emer_a_ivac_q0916_n_co' \\
tex							& `emer_a_ols_q0916_n_mse' 		& `emer_a_ols_q0916_n_se' 			& `emer_a_ivac_q0916_n_se' \\
tex \multicolumn{4}{l}{ } \\				

tex $x Number of mental health visits 	& `ment_a_ols_q0916_n_m' 		& `ment_a_ols_q0916_n_co' 			& `ment_a_ivac_q0916_n_co' \\
tex							& `ment_a_ols_q0916_n_mse' 		& `ment_a_ols_q0916_n_se' 			& `ment_a_ivac_q0916_n_se' \\				
tex 	 			 		& \multicolumn{3}{r}{[`ment_a_ols_q0916_n_obs']} \\

tex \bottomrule \\
tex	\end{tabular} }
texdoc close


********************************************************************************
********************************************************************************
**# TABLE H9

texdoc init "${Outputs}/Supplementary data_Table_H9.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{1 Year After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{2 Years After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV ///
	& & $ {\scriptsize \mathbb{E}[Y \vert E=0]}$ & OLS & IV \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}
tex 					 	& & & & & & & \\
							
tex $x \textbf{Future eviction:} 	& `fute_a_ldv_q0104_b_m' 		& `fute_a_ldv_q0104_b_co' 		& `fute_a_ivac_q0104_b_co' ///
							& & `fute_a_ldv_q0508_b_m' 		& `fute_a_ldv_q0508_b_co' 		& `fute_a_ivac_q0508_b_co' \\ 
tex 						& `fute_a_ldv_q0104_b_mse' 		& `fute_a_ldv_q0104_b_se' 		& `fute_a_ivac_q0104_b_se' ///
							& & `fute_a_ldv_q0508_b_mse' 	& `fute_a_ldv_q0508_b_se' 		& `fute_a_ivac_q0508_b_se' \\	
tex $x 				 		& \multicolumn{3}{r}{[`fute_a_ldv_q0104_b_obs']} 				& & \multicolumn{3}{r}{[`fute_a_ldv_q0508_b_obs']} \\
									
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `fute_a_ldv_q0104_c_m' 		& `fute_a_ldv_q0104_c_co' 		& `fute_a_ivac_q0104_c_co' ///
							& & `fute_a_ldv_q0508_c_m' 		& `fute_a_ldv_q0508_c_co' 		& `fute_a_ivac_q0508_c_co' \\ 
tex 						& `fute_a_ldv_q0104_c_mse' 		& `fute_a_ldv_q0104_c_se' 		& `fute_a_ivac_q0104_c_se' ///
							& & `fute_a_ldv_q0508_c_mse' 	& `fute_a_ldv_q0508_c_se' 		& `fute_a_ivac_q0508_c_se' \\ 				
tex $x ~~~New York 			& `fute_a_ldv_q0104_n_m' 		& `fute_a_ldv_q0104_n_co' 		& `fute_a_ivac_q0104_n_co' ///
							& & `fute_a_ldv_q0508_n_m' 		& `fute_a_ldv_q0508_n_co' 		& `fute_a_ivac_q0508_n_co' \\ 
tex 						& `fute_a_ldv_q0104_n_mse' 		& `fute_a_ldv_q0104_n_se' 		& `fute_a_ivac_q0104_n_se' ///
							& & `fute_a_ldv_q0508_n_mse' 	& `fute_a_ldv_q0508_n_se' 		& `fute_a_ivac_q0508_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\								
tex $x ~~~Female 			& `fute_f_ldv_q0104_b_m' 		& `fute_f_ldv_q0104_b_co' 		& `fute_f_ivac_q0104_b_co' ///
							& & `fute_f_ldv_q0508_b_m' 		& `fute_f_ldv_q0508_b_co' 		& `fute_f_ivac_q0508_b_co' \\ 
tex 						& `fute_f_ldv_q0104_b_mse' 		& `fute_f_ldv_q0104_b_se' 		& `fute_f_ivac_q0104_b_se' ///
							& & `fute_f_ldv_q0508_b_mse' 	& `fute_f_ldv_q0508_b_se' 		& `fute_f_ivac_q0508_b_se' \\ 			
tex $x ~~~Black  			& `fute_b_ldv_q0104_b_m' 		& `fute_b_ldv_q0104_b_co' 		& `fute_b_ivac_q0104_b_co' ///
							& & `fute_b_ldv_q0508_b_m' 		& `fute_b_ldv_q0508_b_co' 		& `fute_b_ivac_q0508_b_co' \\ 
tex 						& `fute_b_ldv_q0104_b_mse' 		& `fute_b_ldv_q0104_b_se' 		& `fute_b_ivac_q0104_b_se' ///
							& & `fute_b_ldv_q0508_b_mse' 	& `fute_b_ldv_q0508_b_se' 		& `fute_b_ivac_q0508_b_se' \\ 	
							
							
tex \bottomrule \\
tex	\end{tabular} }
texdoc close

